import request from '@/router/axios';
import { baseUrl } from '@/config/env';

export const listPost = (data) => request({
    url: baseUrl + '/system/post/list',
    method: 'get',
    params: data
});

export const addPost = (data) => request({
    url: baseUrl + '/system/post',
    method: 'post',
    data:data
});

export const updatePost = (data) => request({
    url: baseUrl + '/system/post',
    method: 'put',
    data:data
});


export const deletePost = (postId) => request({
    url: baseUrl + '/system/post/'+postId,
    method: 'delete'
});